filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
sieve(cons(0, Y)) → cons(0, sieve(Y))
sieve(cons(s(N), Y)) → cons(s(N), sieve(filter(Y, N, N)))
nats(N) → cons(N, nats(s(N)))
zprimes → sieve(nats(s(s(0))))
filter: {1, 2, 3}
cons: {1}
0: empty set
s: {1}
sieve: {1}
nats: {1}
zprimes: empty set
↳ CSR
↳ CSRInnermostProof
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
sieve(cons(0, Y)) → cons(0, sieve(Y))
sieve(cons(s(N), Y)) → cons(s(N), sieve(filter(Y, N, N)))
nats(N) → cons(N, nats(s(N)))
zprimes → sieve(nats(s(s(0))))
filter: {1, 2, 3}
cons: {1}
0: empty set
s: {1}
sieve: {1}
nats: {1}
zprimes: empty set
The CSR is orthogonal. By [10] we can switch to innermost.
↳ CSR
↳ CSRInnermostProof
↳ CSR
↳ CSDependencyPairsProof
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
sieve(cons(0, Y)) → cons(0, sieve(Y))
sieve(cons(s(N), Y)) → cons(s(N), sieve(filter(Y, N, N)))
nats(N) → cons(N, nats(s(N)))
zprimes → sieve(nats(s(s(0))))
filter: {1, 2, 3}
cons: {1}
0: empty set
s: {1}
sieve: {1}
nats: {1}
zprimes: empty set
Innermost Strategy.
Using Improved CS-DPs we result in the following initial Q-CSDP problem.
↳ CSR
↳ CSRInnermostProof
↳ CSR
↳ CSDependencyPairsProof
↳ QCSDP
↳ QCSDependencyGraphProof
ZPRIMES → SIEVE(nats(s(s(0))))
ZPRIMES → NATS(s(s(0)))
filter(Y, M, M)
filter(Y, N, M)
sieve(Y)
sieve(filter(Y, N, N))
filter(Y, N, N)
nats(s(N))
filter on positions {1, 2, 3}
sieve on positions {1}
s on positions {1}
nats on positions {1}
U(filter(x_0, x_1, x_2)) → U(x_0)
U(filter(x_0, x_1, x_2)) → U(x_1)
U(filter(x_0, x_1, x_2)) → U(x_2)
U(sieve(x_0)) → U(x_0)
U(s(x_0)) → U(x_0)
U(nats(x_0)) → U(x_0)
U(filter(Y, M, M)) → FILTER(Y, M, M)
U(filter(Y, N, M)) → FILTER(Y, N, M)
U(sieve(Y)) → SIEVE(Y)
U(sieve(filter(Y, N, N))) → SIEVE(filter(Y, N, N))
U(nats(s(N))) → NATS(s(N))
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
sieve(cons(0, Y)) → cons(0, sieve(Y))
sieve(cons(s(N), Y)) → cons(s(N), sieve(filter(Y, N, N)))
nats(N) → cons(N, nats(s(N)))
zprimes → sieve(nats(s(s(0))))
filter(cons(x0, x1), 0, x2)
filter(cons(x0, x1), s(x2), x3)
sieve(cons(0, x0))
sieve(cons(s(x0), x1))
nats(x0)
zprimes
↳ CSR
↳ CSRInnermostProof
↳ CSR
↳ CSDependencyPairsProof
↳ QCSDP
↳ QCSDependencyGraphProof
↳ QCSDP
↳ QCSDPSubtermProof
U(filter(x_0, x_1, x_2)) → U(x_0)
U(filter(x_0, x_1, x_2)) → U(x_1)
U(filter(x_0, x_1, x_2)) → U(x_2)
U(sieve(x_0)) → U(x_0)
U(s(x_0)) → U(x_0)
U(nats(x_0)) → U(x_0)
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
sieve(cons(0, Y)) → cons(0, sieve(Y))
sieve(cons(s(N), Y)) → cons(s(N), sieve(filter(Y, N, N)))
nats(N) → cons(N, nats(s(N)))
zprimes → sieve(nats(s(s(0))))
filter(cons(x0, x1), 0, x2)
filter(cons(x0, x1), s(x2), x3)
sieve(cons(0, x0))
sieve(cons(s(x0), x1))
nats(x0)
zprimes
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
U(filter(x_0, x_1, x_2)) → U(x_0)
U(filter(x_0, x_1, x_2)) → U(x_1)
U(filter(x_0, x_1, x_2)) → U(x_2)
U(sieve(x_0)) → U(x_0)
U(s(x_0)) → U(x_0)
U(nats(x_0)) → U(x_0)
↳ CSR
↳ CSRInnermostProof
↳ CSR
↳ CSDependencyPairsProof
↳ QCSDP
↳ QCSDependencyGraphProof
↳ QCSDP
↳ QCSDPSubtermProof
↳ QCSDP
↳ PIsEmptyProof
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
sieve(cons(0, Y)) → cons(0, sieve(Y))
sieve(cons(s(N), Y)) → cons(s(N), sieve(filter(Y, N, N)))
nats(N) → cons(N, nats(s(N)))
zprimes → sieve(nats(s(s(0))))
filter(cons(x0, x1), 0, x2)
filter(cons(x0, x1), s(x2), x3)
sieve(cons(0, x0))
sieve(cons(s(x0), x1))
nats(x0)
zprimes